package staticProxy.demo01;

//房屋代理
public class Proxy1 implements Rent{
    private Host host;

    public Proxy1() {
    }

    public Proxy1(Host host) {
        this.host = host;
    }


    @Override
    public void rent() {
        visit();
        host.rent();
        signContract();
    }

    //看房子
    public void visit(){
        System.out.println("中介带顾客看房子");
    }

    //签合同
    public void signContract(){
        System.out.println("签合同");
    }
}
